//package com.yc.resgoods.config;
//
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.cloud.client.ServiceInstance;
//import org.springframework.cloud.loadbalancer.core.RandomLoadBalancer;
//import org.springframework.cloud.loadbalancer.core.ReactorLoadBalancer;
//import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
//import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.env.Environment;
//
///**
// * @ClassName MyOnlyOnceConfig
// * @since: 2023/8/23 15:10
// * @auth: kirito
// * @description:
// **/
//@Configuration
//public class MyLoadBalancerRuleConfig {
//    @Bean
////    @ConditionalOnMissingBean
//    public ReactorLoadBalancer<ServiceInstance> MyOnlyOncereactorServiceInstanceLoadBalancer(Environment environment, LoadBalancerClientFactory loadBalancerClientFactory) {
//        String name = environment.getProperty(LoadBalancerClientFactory.PROPERTY_NAME);
////        创建自定义balancer
//        return new MyLoadBalancerRule(loadBalancerClientFactory.getLazyProvider(name, ServiceInstanceListSupplier.class));
//    }
//
//}
